import Cookies from 'js-cookie'

// 设置
// Cookies.set(key, value)
// 读取
// Cookies.get(key)
// 删除
// Cookies.remove(key)
const TokenKey = 'hr-token'
// 设置超时时间戳
const timeKey = 'hr-timeout'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
// 获取时间戳
export function getTimeStamp() {
  return Cookies.get(timeKey)
}
// 设置时间戳
export function setTimeStamp() {
  Cookies.set(timeKey, Date.now())
}
